<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>外间距测试</title>
</head>
<style>
    *{
        margin: 0;
        padding: 0;
    }
    .fu{
        background-color: rgba(255, 255, 0, .3);
        overflow: hidden;
    }
    .fu>div{
        width: 100px;
        height: 100px;
        background-color: rgba(0,0,255,.6);
        border: 2px solid #00f;
        color: #fff;
        font-size: 25px;
        font-weight: bold;
    }
    .z1{
        margin-top: 50px;
        margin-bottom: 30px;
    }
    .z2{
        margin-top: 50px;
    }
    .z4{
        margin-bottom: 50px;
    }
    .z3{
        margin: 10px;
        margin: 10px 20px;
        margin: 10px 20px 30px;
        margin: 10px 20px 30px 40px;
        margin: 0 auto;
    }
</style>

<body>
    <div class="fu">
        <div class="z1">子元素1</div>
        <div class="z2">子元素2</div>
        <div class="z3">子元素3</div>
        <div class="z4">子元素4</div>
    </div>
</body>
</html>